package practice;

import java.util.Scanner;

public class Bank {
    public static void main(String[] args) {
        Customer customer = new Customer("冰冰", "351221200303033131",
                "17771819313", "广州花都");
        System.out.println(customer.say() +"\n");
        Account account = new Account(933913, 3000000, customer);
        System.out.println(account.getInfo());
        System.out.print("\n请输入存款金额：");
        Scanner scan = new Scanner(System.in);
        double amount = scan.nextDouble();
        if (account.save(amount))
            System.out.println("存款成功");
        else
            System.out.println("存款失败");
        System.out.println(account.getInfo());
        System.out.print("\n请输入取款金额：");
        amount = scan.nextDouble();
        if (account.withdraw(amount))
            System.out.println("取款成功");
        else
            System.out.println("取款失败");
        System.out.println(account.getInfo());
    }
}
